﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class OFFPanel : MonoBehaviour
{
    public Button BackButton;
    public GameObject ZheZhaoImage;
    
    
    void Start()
    {
        BackButton.onClick.AddListener(OnClickOFF);
        ZheZhaoImage = MainPanel.instance.ZheZhaoImage;
    }
    /// <summary>
    /// /关闭
    /// </summary>
    public void OnClickOFF()
    {
        ShortVoice.instance.PlayVoice("AnNiu");
        Destroy(gameObject);
        ZheZhaoImage.GetComponent<Image>().color = new Color(0, 0, 0, 0);
        ZheZhaoImage.GetComponent<Image>().raycastTarget = false;
    }

}
